﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class account_profile : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            txt_FirstName.Text = Profile.FirstName;
            txt_LastName.Text = Profile.LastName;
            txt_Phone.Text = Profile.Phone;
            drpList_City.SelectedValue = Profile.City.ToString();
            drpList_Town.SelectedValue = Profile.Town.ToString();
            txt_vicinity.Text = Profile.Vicinity;
            txt_street.Text = Profile.Street;
            txt_no.Text = Profile.No.ToString();
            Page.DataBind();
        }
    }
    protected void UpdateProfile(object sender, EventArgs e)
    {
        Profile.FirstName = txt_FirstName.Text;
        Profile.LastName = txt_LastName.Text;
        Profile.Phone = txt_Phone.Text;
        Profile.City = Convert.ToInt32(drpList_City.SelectedValue);
        Profile.Town = Convert.ToInt32(drpList_Town.SelectedValue);
        Profile.Vicinity = txt_vicinity.Text;
        Profile.Street = txt_street.Text;
        Profile.No = Convert.ToInt32(txt_no.Text);
    }
}